<?php $this->load->view("common/header") ?>
<script type="text/javascript">
$(function() {
	//	$( "#job_start" ).datepicker({ dateFormat: 'yy-mm-dd' });
	});
</script>
<body>
  <div id="page_wrapper">
<?php $this->load->view("common/speel") ?>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td  align="left" valign="top"><?php $this->load->view("nav/main") ?></td>
      <td width="1265" valign="top" id="mainContent">  
	  <div id="crum">
<?php echo $crum ?>
</div><br>

	  


  
  <table width="100%" border="0" cellpadding="5" cellspacing="0" rules="groups">
    <tr class="tbl_row_header">
    <td align="left">Client name</td>
    <td align="left">Contacts</td>
    <td align="left">Phone</td>
    <td align="left">Email</td>
    <td align="left">Address</td>
    <td align="center">Delete</td>
  </tr>
<?php foreach($clients as $client) { ?>
  <tr class="tbl_row">
    <td width="90" onClick="gotoClient('<?php echo $client['id'] ?>')" align="left"><?php echo $client['company_name'] ?></td>
    <td width="94" onClick="gotoClient('<?php echo $client['id'] ?>')" align="left"><?php echo $client['company_contact1'] ?><br>
      <?php echo $client['company_contact2'] ?></td>
    <td width="77" onClick="gotoClient('<?php echo $client['id'] ?>')" align="left"><?php echo $client['company_phone1'] ?><br>
      <?php echo $client['company_phone2'] ?></td>
    <td width="72" onClick="gotoClient('<?php echo $client['id'] ?>')" align="left"><?php echo $client['company_email'] ?></td>
    <td width="112" onClick="gotoClient('<?php echo $client['id'] ?>')" align="left">
	<?php 
	$address = array($client['company_address1']
				,$client['company_suburb']
				,$client['state']
				,$client['company_postcode']
				);
		
	echo format_client_address($address) ?>
    
    </td>
    <td width="46" align="center" ><input name="client_act_delete_<?php echo $client['id'] ?>" type="checkbox" id="" class="client_act_delete" value="1" jobID="<?php echo $client['id'] ?>">
</td>
  </tr>


  <?php } ?>
  </table>
  
  </td>
    </tr>
</table>

<?php $this->load->view("common/footer") ?>
</div>
</body>
</html>
